<template>
  <div>
    a组件

    <button @click="emit">派发一个事件</button>
  </div>
</template>

<script lang="ts" setup>
import Bus from "./bus";
import { ref } from "vue";
let flag = ref<boolean>(false);
const emit = () => {
  flag.value = !flag.value;
  Bus.emit("on-click", flag);
};
</script>
<style lang="less" scoped>
div {
  width: 400px;
  height: 400px;
  background: chocolate;
}
</style>
